package com.rtech.app.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.rtech.app.service.TraversalService;
import com.rtech.model.File;
import com.rtech.model.LoactionInfo;

@Controller
public class TraversalServiceController {
 
	@Autowired
	TraversalService traversalService;
	
	@RequestMapping(value = "/location/{fullPath}",  method=RequestMethod.GET)
	@ResponseBody
	public String getCompletePathInfo(String fullPath) {
		LoactionInfo response = traversalService.getCompletePathInfo(fullPath);
//	    return new ModelAndView("jaxbView", BindingResult.MODEL_KEY_PREFIX + "response", response);
		return "";
	}
 
	@RequestMapping(value = "/location/{filePath}")
	@ResponseBody
	public String getFileInformation(@PathVariable String filePath) {
		File file = traversalService.getFileInformation(filePath);
		return "";
	}
 
}